using UnityEngine;
using System.Collections;

public class Logging
{
	public int writeTimer;
	
    public static System.Collections.Generic.Queue<float> Tracker;

    public Logging()
    {
        Tracker = new System.Collections.Generic.Queue<float>();
    }
	
	public void Write()
	{
		System.Threading.Thread.Sleep(writeTimer);
		System.IO.StreamWriter write = new System.IO.StreamWriter("Logging.txt");

        while (Tracker.Count > 0)
        {
            write.WriteLine(Tracker.Dequeue().ToString());
        }
        write.Close();
		Debug.Log("Wrote to file");
	}
}
